package com.szholly.pro.watergas_server.ps.data;

import java.util.HashMap;

import com.szholly.data.general.metadata.table.DefulatDomainTable;
import org.springframework.stereotype.Component;

import com.szholly.data.general.Field;
import com.szholly.data.general.InterceptorTableBase;
import com.szholly.data.general.metadata.IBaseTable;
import com.szholly.utils.spring.SpringBeanFactory;
import org.springframework.stereotype.Component;
import com.szholly.data.general.GlobalDataType;
import com.szholly.data.general.RowBase;

/**
 * OperationDailyVerification
 */
@Component("OperationDailyVerification")
public class OperationDailyVerificationTable extends InterceptorTableBase  implements IBaseTable{

	public final static String TABLE_NAME = "OPERATION_DAILY_VERIFICATION";
	
	/**
	 * single ref
	 */
	public static OperationDailyVerificationTable getSingleRef() {
		return (OperationDailyVerificationTable) SpringBeanFactory.getBean("OperationDailyVerification");
	}

	@Override
	public String getMetadataTableName() {
		return TABLE_NAME;
	}

	@Override
	public String getMetadataTableAliasName() {
		return "OperationDailyVerification";
	}

	private HashMap<String, Field> fields;

	@Override
	protected HashMap<String, Field> fields() {
		if (fields == null) {
			fields = new HashMap<String, Field>();

			Field itemField = null;
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_CreatedBy);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(5);
			itemField.setFieldAliasName("创建人");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_SecondSample);
			itemField.setDataType(GlobalDataType.Int32);
			itemField.setFieldID(6);
			itemField.setFieldAliasName("标样2");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_VerifyResult);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(7);
			itemField.setFieldAliasName("校验结论");
			itemField.setAllowNull(true);
			itemField.setMaxLen(60);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_Guid);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(8);
			itemField.setFieldAliasName("GUID");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_CalibrationLiquidOrder);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(9);
			itemField.setFieldAliasName("校准液顺序号（校准液1，校准液2）");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_StationCode);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(10);
			itemField.setFieldAliasName("站点代码");
			itemField.setAllowNull(false);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_CalibrationValue);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(11);
			itemField.setFieldAliasName("校准值（既有数值也有中文，地表水）");
			itemField.setAllowNull(true);
			itemField.setMaxLen(100);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_DeviceNum);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(12);
			itemField.setFieldAliasName("设备编号");
			itemField.setAllowNull(false);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_VerifyType);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(13);
			itemField.setFieldAliasName("校验类型");
			itemField.setAllowNull(true);
			itemField.setMaxLen(10);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_StdSample);
			itemField.setDataType(GlobalDataType.Int32);
			itemField.setFieldID(14);
			itemField.setFieldAliasName("标样1");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_CreatedOn);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(15);
			itemField.setFieldAliasName("创建时间");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_VerifyDate);
			itemField.setDataType(GlobalDataType.DateTime);
			itemField.setFieldID(16);
			itemField.setFieldAliasName("教研时间");
			itemField.setAllowNull(true);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_TaskCode);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(17);
			itemField.setFieldAliasName("任务单号");
			itemField.setAllowNull(true);
			itemField.setMaxLen(50);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_RestoreMethod);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(18);
			itemField.setFieldAliasName("失败措施及结果");
			itemField.setAllowNull(true);
			itemField.setMaxLen(1000);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
			
			itemField = new Field();
			itemField.setFieldName(OperationDailyVerificationRow.FIELD_ParamName);
			itemField.setDataType(GlobalDataType.String);
			itemField.setFieldID(19);
			itemField.setFieldAliasName("地表水参数项");
			itemField.setAllowNull(true);
			itemField.setMaxLen(1000);
			fields.put(itemField.getFieldName().toUpperCase().trim(), itemField);
		}
		return fields;
	}

	@Override
	public String getTableGroup() {
		return "OperationDailyVerification";
	}
}